<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>index</title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		#wrap{
			width: 500px;
			height: 300px;
			border: 1px solid black;
			margin: 0 auto;
			text-align: center;
			
		}
	</style>
</head>
<body>
	<div id="wrap">
		<form action="http://127.0.0.1:8888/login" method="GET">
			<br><br>
			用户:<input type="text" name="username" id="username"><br><br>
			密码:<input type="password" name="password" id="password"><br><br>
			<input type="submit" name="" value="登录" id="sub">
		</form>
	</div>
</body>
<script type="text/javascript" src="jquery-3.1.1.js"></script>
<script type="text/javascript">

	// 实现登录密码为空..登录按钮不可点
	$("#sub").click(function(){
		var a = $("#username").val();
		var b = $("#password").val();
		//	判断
		if (a == "" || b == "") {
			alert("账号和密码不能为空");
		}
	})
</script>
</html>